<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page import="dao.OrderDao" %>
<%@ page import="domain.Order" %>
<%@ page import="java.util.List" %>
<%--
  Created by IntelliJ IDEA.
  User: ThinkPad
  Date: 2021/12/26
  Time: 9:07
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" isELIgnored="false"%>
<html>
<head>
    <title>后台-客户购买日志</title>
</head>
<body>
<%
    OrderDao dao = new OrderDao();
    List<Order> orders = dao.browse();
%>
<%@include file="headForRoot.jsp"%>
<br />
<table style="width: 80%;text-align: center;margin-left: 10%">
    <tbody>
    <tr>
        <td style="background-color: #afd1f3">
            <strong>客 户 购 买 日 志</strong>
        </td>
    </tr>
    <tr>
        <td style="width: 100%">
            <table style="width: 100%;text-align: center">
                <tr>
                    <td style="width: 20%">订单编号</td>
                    <td style="width: 8%">用户编号</td>
                    <td style="width: 15%">送货地址</td>
                    <td style="width: 10%">收货姓名</td>
                    <td style="width: 10%">收货电话</td>
                    <td style="width: 15%">收货邮箱</td>
                    <td style="width: 15%">下单时间</td>
                    <td style="width: 7%">订单详情</td>
                </tr>
            </table>
        </td>
    </tr>
    <tr>
        <td style="width: 100%">
            <c:forEach var="order" items="<%=orders%>">
                <table style="width: 100%;text-align: center">
                    <tr>
                        <td style="width: 20%;font-size: small">${order.id}</td>
                        <td style="width: 8%;font-size: large;font-weight: bold">${order.uid}</td>
                        <td style="width: 15%;font-size: small">${order.raddr}</td>
                        <td style="width: 10%">${order.rname}</td>
                        <td style="width: 10%">${order.rphone}</td>
                        <td style="width: 15%;font-size: small">${order.remail}</td>
                        <td style="width: 15%">${order.ordertime}</td>
                        <td style="width: 7%"><a href="${pageContext.request.contextPath}/detail.jsp?oid=${order.id}">详情</a></td>
                    </tr>
                </table>
            </c:forEach>
        </td>
    </tr>
    </tbody>
</table>
<br />
<a href="${pageContext.request.contextPath}/manage.jsp" style="margin-left: 45%;color: blue;font-weight: bold">&lt;返回管理系统主页</a>
<%@include file="tail.jsp"%>
</body>
</html>
